program eva02;
var n,i,j,k:integer;
    a:array[1..20] of integer;
    s1,s2:string;
begin
  readln(n);
  for i:=1 to n do
    read(a[i]);
  readln;
  for i:=1 to n do
    for j:=i+1 to n do
       begin
         str(a[i],s1);
         str(a[j],s2);
         if s1+s2            begin
             k:=a[i];
             a[i]:=a[j];
             a[j]:=k;
           end;
       end;
  for i:=1 to n do
    write(a[i]);
  writeln;
end.,2];
      y:=y+aa[3,1];
      i:=i+aa[3,2];
      aa[1,1]:=aa[2,1];
      aa[1,2]:=aa[2,2];
      aa[2,1]:=aa[3,1];
      aa[2,2]:=aa[3,2];
    end;
end;
begin
  readln(a,n,m,x);
  rei(yy,ii,n-3);
  d:=round(((m-a)-yy*a)/ii);
  rei(yy,ii,x-2);
  writeln(ii*d+yy*a+a);
end.
